<?php

class Ext_Forms_EditRole extends Zend_Form
{

    
    public function init()
    {
        parent::init();
        $element = new Zend_Form_Element_Text( 'name' );
        $element->setLabel( 'Nombre del Rol' )->setRequired( true )->addValidator( 'NotEmpty' );
        $this->addElement( $element );
        
        $element = new Zend_Form_Element_Submit( 'accept' );
        $element->setDecorators( array( 
                        'ViewHelper', 
                        'Errors' 
        ) );
        $this->addElement( $element );
        
        $element = new Zend_Form_Element_Button( 'cancel' );
        $element->setDecorators( array( 
                        'ViewHelper', 
                        'Errors' 
        ) );
        $this->addElement( $element );
        
        $this->addDisplayGroup( array( 'accept', 
                        'cancel' 
        ), 'Menu' );
        
        $this->setMethod( 'post' );
    
    }
}
